package com.imcrl.piano.mvc.model.vo
{
	public class NoetsStack
	{
		private var _position:int;
		private var list:Vector.<NoetsDefVO>;
		
		private var _total:int;
		public function NoetsStack(list:Vector.<NoetsDefVO>)
		{
			this.list=list;
			this._total=list.length;
			
			this._position=-1;
		}
		
		public function get hasNext():Boolean{
			return _position<_total-1;
		}
		
		public function set position(value:int):void{
			this._position=value;
		}
		public function get position():int{
			return this._position;
		}
		
		public function next():NoetsStack{
			this._position++;
			return this;
		}
		
		public function back():NoetsStack{
			this._position--;
			return this;
		}
		
		public function get():NoetsDefVO{
			//trace(_position,_total)
			return this.list[_position] ;
		}
	}
}